﻿Imports System.Reflection.Assembly
Imports System.Reflection

Public NotInheritable Class frmAboutBox

    Private Sub frmAboutBox_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ' Set the title of the form.
        Dim ApplicationTitle As String = FormsApplicationContext.current.ApplicationTitle
        
        Me.Text = String.Format("About {0}", ApplicationTitle)
        ' Initialize all of the text displayed on the About Box.
        '    properties dialog (under the "Project" menu).
        Me.LabelProductName.Text = My.Application.Info.ProductName
        Me.LabelVersion.Text = String.Format("Version {0}, Database Version: {1}", My.Application.Info.Version.ToString, CStr(DBVersion.SYSTEM_DATABASE_VERSION))
        Me.LabelCopyright.Text = My.Application.Info.Copyright
        Me.LabelCompanyName.Text = My.Application.Info.CompanyName
        ' display components used by this assembly
        Dim assemComponents As AssemblyName() = [Assembly].GetExecutingAssembly().GetReferencedAssemblies()
        Dim assemName As AssemblyName
        For Each assemName In assemComponents
            Dim item As ListViewItem = listComponents.Items.Add(assemName.Name)
            item.SubItems.Add(assemName.Version.ToString())
        Next assemName

    End Sub

    Private Sub OKButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OKButton.Click
        Me.Close()
    End Sub

    Private Sub LabelCompanyName_LinkClicked(ByVal sender As System.Object, _
                    ByVal e As LinkLabelLinkClickedEventArgs) _
                Handles LabelCompanyName.LinkClicked

        System.Diagnostics.Process.Start("www.iic.org.cy")

    End Sub
End Class
